package com.google.code.head2head.service.impl;

import java.util.List;

import org.apache.log4j.Logger;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.google.code.head2head.dao.UserDao;
import com.google.code.head2head.service.LoginService;

@Transactional(propagation=Propagation.REQUIRED)
public class LoginServiceImpl implements LoginService{
	
	private Logger LOG = Logger.getLogger(LoginServiceImpl.class);
	
	private UserDao userDao;

	public Long authenticate(String login, String password) {
		return userDao.authenticate(login, password);
	}
	
	public List getAllUsers(){
		return userDao.findAll();
	}

	public UserDao getUserDao() {
		return userDao;
	}

	public void setUserDao(UserDao userDao) {
		this.userDao = userDao;
	}

}
